package com.itheima.entry.service.impl;

import com.itheima.entry.dao.IUserDao;
import com.itheima.entry.domain.UserInfo;
import com.itheima.entry.factory.UserFactroy;
import com.itheima.entry.service.ISuperService;

import java.util.ArrayList;

public class SuperServiceImpl implements ISuperService {


    private IUserDao userDao = UserFactroy.getDao();

    @Override
    public ArrayList<UserInfo> getAllUsers() {
        return userDao.getAllUsers();
    }

    @Override
    public boolean removeUser(String name) {

        return userDao.removeUser(name);
    }

    @Override
    public void changePassword(String username, String password) {
        userDao.ChangePassword(username, password);
    }

    @Override
    public boolean isUserExist(String username) {

        return userDao.isUserExist(username);
    }
}
